package com.gill.aspect;

import org.sampleSpringFramework.aop.annotation.Aspect;
import org.sampleSpringFramework.aop.annotation.Order;
import org.sampleSpringFramework.aop.aspect.DefaultAspect;
import org.sampleSpringFramework.core.annotation.Controller;

import java.lang.reflect.Method;

/**
 * 用于测试使用的切面类
 */
@Aspect(value = Controller.class)
@Order(1)
public class Aspect11 extends DefaultAspect {
	@Override
	public void before(Class<?> clazz, Method method, Object[] args) throws Throwable {
		System.out.println("【Aspect11：controller：before】");
	}

	@Override
	public Object afterReturning(Class<?> clazz, Method method, Object[] args, Object result) throws Throwable {
		System.out.println("【Aspect11：controller：afterReturning】");
		return result;
	}

	@Override
	public void afterThrowing(Class<?> clazz, Method method, Object[] args, Throwable e) throws Throwable {
		System.out.println("【Aspect11：controller：afterThrowing】");
	}
}
